package org.ljy.lotterysystem.controller.param;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * 抽奖时的参数
 */
@Data
public class DrawPrizeParam implements Serializable {

    @NotNull(message = "活动id不能为空！！！")
    private Long activityId;

    @NotNull(message = "奖品id不能为空！！！")
    private Long prizeId;
//
//    @NotBlank(message = "奖品等级不能为空！！！")
//    private String prizeTiers;


    @NotNull(message = "中奖时间不能为空！！！")
    private Date winningTime;

    /**
     * 中奖的人数
     */
    @NotEmpty
    @Valid
    private List<Winner> winnerList;

    @Data
    public static class Winner implements Serializable {

        @NotNull(message = "待抽奖人员id不能为空！！！")
        private Long userId;

        @NotBlank(message = "待抽检人员名字不能为空！！！")
        private String userName;

    }
}
